Locust HttpUser This code defines a Locust user class to simulate user visits to a website and randomly set user agents. It uses some basic features of the Locust library, including defining user classes, tasks, and HTTP requests. The type of code 2024-12-16 12:15:41 21 views
Locust FastHttpUser This function generates a custom Locust user class to simulate random user activities on a website, such as logging in, logging out, and viewing a profile. The type of user activity is determined by the parameter `activity_type`. Custom Locust user class 2024-12-16 12:10:00 3 views
Locust This code defines a user class (either HttpUser or FastHttpUser) randomly chosen from the Locust library. It includes three tasks: loading a page, posting data, and getting user information. There is a random wait time between tasks. Locust user class 2024-12-16 12:06:56 4 views
The code This code defines a user behavior based on the Locust library, simulating random actions of a user on a website, including accessing random resources, submitting forms, browsing products, searching for products, and logging in and out. The type of code 2024-12-16 12:06:40 16 views
Locust This function defines a Locust HttpUser class that performs random HTTP GET and POST requests and prints the first 100 characters of the response. Python Function 2024-12-16 12:06:04 3 views
Locust FastHttpUser This function randomly returns one of two Locust user classes. The first one is a random task user based on FastHttpUser, and the second one is a random shape user based on HttpUser and LoadTestShape. Locust User Class 2024-12-16 12:03:10 3 views
Locust This function defines a class named RandomUser that inherits from the HttpUser class in the Locust library. The class simulates different types of HTTP requests, including GET, POST, PUT, and DELETE requests, and has random wait times. Python Function 2024-12-16 12:02:51 4 views
Locust This function defines a Locust HttpUser subclass named RandomHttpUser, used to simulate HTTP GET requests. The function randomly generates a request parameter 'count' ranging from 1 to 10, and verifies that the response status code is 200. The type of code 2024-12-16 11:59:38 3 views
The code This code defines a Locust user class named WebsiteUser, which inherits from HttpUser. It simulates different browsers accessing by using random user agents. The code defines a method named random_user_agent, which randomly selects one from the predefined list of user agents and sets it as the HTTP request header. The type of code 2024-12-16 11:58:58 4 views
Locust FastHttpUser This code defines a simulation function based on Locust, which simulates a FastHttpUser that randomly selects an HTTP GET request to the `/random-item` path. The function also includes command-line arguments to start the simulation. The type of code 2024-12-16 11:56:39 5 views